import 'package:json_annotation/json_annotation.dart';

part 'data.g.dart';

//命令： flutter packages pub run build_runner build
@JsonSerializable()
class TzUserData {
  int adminid;
  String username;
  String mobile;
  String email;
  String fcmtoken;

  TzUserData({
    this.adminid,
    this.username,
    this.mobile,
    this.email,
    this.fcmtoken,
  });

  //反序列化
  factory TzUserData.fromJson(Map<String, dynamic> json) =>
      _$TzUserDataFromJson(json);
  //序列化
  Map<String, dynamic> toJson() => _$TzUserDataToJson(this);
}
